package leading;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.PrintWriter;

public class CreateInsertSQL {
	public static void main(String[] args) throws Exception {
		BufferedReader br= new BufferedReader(new FileReader(new File("D:/hbbnodestatus.sql")));
		PrintWriter pw = new PrintWriter(new File("D:/newStatusHBB.sql"));
		String line = null;
		while((line=br.readLine())!=null){
			String commLine = "insert into 'NODE_CONN_STATUS'('CONN_DATE','NODE_NAME','NODE_CODE','STATUS','SUCCESS_NUM','CONN_NUM') values (";
			String newLine = "";
			String[] arr = line.split(",");
			for(int i = 1;i < arr.length;i++){
				newLine = newLine + arr[i] + ",";
			}
			newLine = commLine + newLine;
			newLine = newLine.substring(0, newLine.length()-1);
			pw.println(newLine);
		}
	}
}
